var app = getApp();
Page({


  data: {
    name: '',
    selecttimes: " 请选择首次上牌日期",
    selecttimes1: '',
    selectbrand: "请选择车辆款型",
    location: "请选择所在城市",
  },

  onLoad: function(options) {

  },
  bindDateChange11: function(e) {
    console.log(e.detail.value);
    var t = e.detail.value.split("-");
    this.setData({
      selecttimes: t[0] + "年" + t[1] + "月",
      selecttimes1: e.detail.value
    });
  },
  selectbrand: function(e) {
    wx.navigateTo({
      url: "/pages/selectscards/index"
    });
  },
  qs: function() {
    wx.navigateTo({
      url: '../qs/qs?qq=1',
    })
  },
  release: function(t) {

    console.log(t)
    var that = this
    var u = t.detail.value.transfer
    var c = that.data.selectbrand
    var s = that.data.location
    var p = that.data.selecttimes1
    var h = that.data.selecttimes
    if ("请选择车辆款型" == c || "undefined" == c || '' == c) {
      app.util.message({
        title: "请选择车辆款型",
        type: "error"
      })
    } else if ("请选择首次上牌日期" == p || "undefined" == p || '' == p) {
      app.util.message({
        title: "请选择首次上牌日期",
        type: "error"
      })
    } else if ("请选择所在城市" == s || "undefined" == s || '' == s) {
      app.util.message({
        title: "请选择所在城市",
        type: "error"
      })
    } else if ("请输入手机号码" == u || "undefined" == u || '' == u) {
      app.util.message({
        title: "请输入手机号码",
        type: "error"
      })
    } else {
      wx.showLoading({
        title: '成功',
      })
      // setTimeout(function() {
      //   wx.switchTab({
      //     url: '../index/index',
      //   })
      // }, 1000)
    }
    app.util.request({
      url: "entry/wxapp/Api",
      data: {
        m: "monai_market",
        r: "extends.addscar",
        uid: wx.getStorageSync("uid")
    
      },
      success(res) {
        console.log(res)
  
      }
    });

  }

})